import {studentInstance} from "@/api/common/util.ts";

export const getTopic = (courseId: string) => {
    return studentInstance.get(`/topic/${courseId}`);
}

export const getTopicDetail = (topicId: string) => {
    return studentInstance.get(`/topic/detail/${topicId}`);
}

export const addMessage = (topicId: string, message: string) => {
    return studentInstance.post(`/topic/message/${topicId}/${message}`)
}

export const getMessage = (topicId: string) => {
    return studentInstance.get(`/topic/message/${topicId}`);
}